/**  
 * All rights Reserved, Designed By www.woniuxy.com
 * @Title:  Account.java   
 * @Package com.woniu.domain   
 * @Description:    Description  
 * @author: 蜗牛学院  
 * @date:   2019年8月2日 上午10:03:25
 * @user:   Administrator  
 * @version V1.0 
 * @Copyright: 2019 www.woniuxy.com Inc. All rights reserved. 
 * 注意：本内容仅限于成都蜗牛创想科技有限公司，禁止外泄以及用于其他的商业目
 */ 
package com.woniu.domain;

/**
 * @author Administrator
 *
 */
public class CartItem {
	private Goods goods;
	private int buyCount;
	private double subTotalPrice;
	/**
	 * @return the goods
	 */
	public Goods getGoods() {
		return goods;
	}
	/**
	 * @param goods the goods to set
	 */
	public void setGoods(Goods goods) {
		this.goods = goods;
	}
	/**
	 * @return the buyCount
	 */
	public int getBuyCount() {
		return buyCount;
	}
	/**
	 * @param buyCount the buyCount to set
	 */
	public void setBuyCount(int buyCount) {
		this.buyCount = buyCount;
	}
	/**
	 * @return the subTotalPrice
	 */
	public double getSubTotalPrice() {
		return goods.getPrice()*buyCount;
	}
	
	@Override
	public String toString() {
		return "CartItem [goods=" + goods + ", buyCount=" + buyCount + ", subTotalPrice=" + subTotalPrice + "]";
	}
	public CartItem(Goods goods, int buyCount, double subTotalPrice) {
		super();
		this.goods = goods;
		this.buyCount = buyCount;
		this.subTotalPrice = subTotalPrice;
	}
	public CartItem() {
		super();
	}
	
}
